package com.ss.android.newmedia.message.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.graphics.drawable.VectorDrawableCompat;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;

import com.ss.android.article.browser.R;
import com.ss.android.image.AsyncImageView;

public final class x extends Dialog {
    protected s a;
    public String b;
    public String c;

    public x(Context arg1) {
        super(arg1);
    }

    public final void a(s arg1) {
        this.a = arg1;
    }

    protected final void onCreate(Bundle arg8) {
        super.onCreate(arg8);
        this.requestWindowFeature(1);
        this.setCancelable(true);
        this.setCanceledOnTouchOutside(false);
        this.setContentView(com.ss.android.article.browser.R.layout.ah);
        View v0 = this.findViewById(com.ss.android.article.browser.R.id.content);
        View v1 = this.findViewById(com.ss.android.article.browser.R.id.title);
        View v2 = this.findViewById(com.ss.android.article.browser.R.id.j7);
        ((TextView)v1).setCompoundDrawablesWithIntrinsicBounds(VectorDrawableCompat.create(this.getContext().getResources(), R.drawable.fq, null), null, null, null);
        ((TextView)v0).setText(this.b);
        v1 = this.findViewById(com.ss.android.article.browser.R.id.image);
        if(TextUtils.isEmpty(this.c)) {
            ((TextView)v0).setPadding(0, this.getContext().getResources().getDimensionPixelOffset(R.dimen.gv), 0, 0);
            ((AsyncImageView)v1).setVisibility(View.GONE);
        }
        else {
            ((TextView)v0).setPadding(0, this.getContext().getResources().getDimensionPixelOffset(R.dimen.gu), 0, 0);
            ((AsyncImageView)v1).setVisibility(View.VISIBLE);
            ((AsyncImageView)v1).setUrl(this.c);
        }

        v0 = this.findViewById(com.ss.android.article.browser.R.id.j2);
        this.findViewById(com.ss.android.article.browser.R.id.j3);
        v0.setOnClickListener(new y(this));
        v2.setOnClickListener(new z(this));
    }
}

